<%@ include file="/taglibs.jsp"%>

<style>
tr{
	border:1px solid #000000;
}
</style>
<title>Winter War Slot Viewer</title>

<h2>${slot.slotName} ${slot.startDateHour } ${slot.startDateAMPM } - ${ slot.endDateHour} ${slot.endDateAMPM } </h2>

To select an event, just click on it's name, and your registration will be updated.
<br/><br/>
<display:table name="events" id="event" pagesize="30" cellspacing="2" cellpadding="2" requestURI="">
	<display:column title="Event Name" sortable="true" style="width:75px">
		<c:choose>
			<c:when test="${event.reservedSeats < event.totalSeats }">
				<a href="javascript:updateParent(${event.eventID })">${event.eventName }</a>
			</c:when>
			<c:otherwise>${event.eventName } (FULL)</c:otherwise>
		</c:choose>
	</display:column>
	<display:column property="eventDesc" sortable="true" style="width:300px"/>
	<display:column property="rules" sortable="true" style="width:100px"/>
	<display:column title="Player Experience"  sortable="true" style="width:125px">
		<c:choose>
			<c:when test="${event.playerExperience == 1}"><bean:message key="event.experience1"/></c:when>
			<c:when test="${event.playerExperience == 2}"><bean:message key="event.experience2"/></c:when>
			<c:when test="${event.playerExperience == 3}"><bean:message key="event.experience3"/></c:when>
			<c:when test="${event.playerExperience == 4}"><bean:message key="event.experience4"/></c:when>
			<c:when test="${event.playerExperience == 5}"><bean:message key="event.experience5"/></c:when>
			<c:when test="${event.playerExperience == 6}"><bean:message key="event.experience6"/></c:when>
		</c:choose>
	</display:column>
	<display:column title="Judge"  sortable="true" style="width:75px">
		${event.user.firstName } ${event.user.lastName }
		<c:choose>
			<c:when test="${event.additionalJudges != null}">
				&nbsp;And ${event.additionalJudges }
			</c:when>
		</c:choose> 
	</display:column>
	<display:column title="Event Type"  sortable="true" style="width:75px">
		<c:choose>
			<c:when test="${event.eventType == 1}">Board Game</c:when>
			<c:when test="${event.eventType == 2}">Card Game</c:when>
			<c:when test="${event.eventType == 3}">Miniatures Event</c:when>
			<c:when test="${event.eventType == 4}">Role Playing Event</c:when>
			<c:when test="${event.eventType == 5}">ASL Event</c:when>
			<c:when test="${event.eventType == 6}">RPGA Event</c:when>
		</c:choose>
	</display:column>
</display:table>

<script type="text/javascript" language="javascript">
	function updateParent(eventID){
		window.opener.updateReg(${parentSlotID}, eventID);
		window.close();
	}
</script>
		